package com.ytt.core.service.entity.teacher;

import com.ytt.core.service.entity.AbstractBaseEntity;
import com.ytt.core.service.entity.user.User;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

/**
 * 教师
 * @author chenwen
 * @date 2019/9/12 15:02
 */
@Entity
@Setter
@Getter
@Table(name = "sys_teacher")
public class Teacher  extends AbstractBaseEntity {

    /**
     * 工号
     */
    @Column(name = "job_number",unique = true)
    private String job_number;


    /**
     * 是否离职
     * 离职不允许登录
     */
    @Column(name = "is_quit", nullable = false)
    private Boolean is_quit = false;


    /**
     * 所属的用户
     */
    @ManyToOne(targetEntity = User.class)
    @JoinColumn(name = "user_id")
    private User user;
}
